home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1985 Fall
/
rerun-1985-fall.d64
/
test maker
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
78 lines
5 poke53280,1:poke53281,1:poke646,2
10 dm=int(fre(0)/60)+10:ifdm>250thendm=250
20 ll=22:ifpeek(44)=8thenll=40:dm=250
40 p1=ll/2-6:p2=p1+ll+3:dn$="":printchr$(14):a=1
50 dimq$(dm,2):dimrn%(dm)
70 print"[147]"tab(p1)"[209][213][197][211][212][201][207][206][211]!":printtab(p1)"[157][157][157][198]ile editor program"
75 gosub1100
100 print"[147]"tab(p1)"*** [205][197][206][213][146] ***"
105 printtab(p2)"[215][146]rite
108 [139]n[177]0[167][153][163]p2)"valwaitdit":[153][163]p2)"(NULL)waitave
110 printtab(p2)"[204][146]oad"
120 gosub1010
122 ifx$="w"thengosub200:goto100
124 ifx$="l"thengosub600:goto100
125 ifn=0then120
126 ifx$="e"thengosub300:goto100
128 ifx$="s"thengosub500:goto100
130 goto120
199 rem write subroutine
200 ifn=dmthenprint"[147][198]ile full":gosub1100:return
205 fm=peek(51)-peek(49)+256*(peek(52)-peek(50)):iffm<300thenfm=fre(0)
210 iffm<300thenprint"[147]"fm"bytes left":print"[208]ress any key":gosub1010
220 print"[147]"dn$"[197]nter menu[146] when done":print""tab(p1)"[157]*** [215][210][201][212][197][146] ***
230 n[178]n[170]1:[153]"(NULL)uestion #"n:[133]"";q$(n,1)
240 [139]q$(n,1)[178]"menu"[167]q$(n,1)[178]"":n[178]n[171]1:[142]
250 [153]"atnnswer ":[133]"cmdcmdcmd";q$(n,2)
260 [137]200
299 [143] edit subroutine
300 [141]390
310 [133]"(NULL)hat number";r$:r[178][197](r$):[139]r[179]1[176]r[177]n[167]300
320 [139]r[177]n[167][142]
325 [141]390:[153]"#"r"":[153]q$(r,1)
330 [153]""q$(r,2):[153][163]p1)"cmdcmdcmdcmdcmd(NULL)waitext lenwaithange str$waitrop (NULL)waitenu
340 gosub1010
342 ifx$="n"thenr=r+1:goto320
344 ifx$="m"thenreturn
346 ifx$="d"then450
348 ifx$="c"then400
360 goto340
390 print"[147]"tab(p1)"*** [197][196][201][212][146] ***":return
399 rem change subroutine
400 print"[145][145]":fori=1toll:print"[160]";:next:print"[145][145][145][145]revised question[146]
410 [133]"cmdcmd";q$(r,1):[153]"revised answerwait":[133]"cmdcmd";q$(r,2):[137]320
449 [143] drop subroutine
450 [153]"onon":[129]i[178]1[164]ll:[153]" ";:[130]:[153]"str$rop":[141]1300:[139]x$[179][177]"y"[167]320
455 [139]r[178]n[167]470
460 [129]i[178]r[164]n[171]1:q$(i,1)[178]q$(i[170]1,1):q$(i,2)[178]q$(i[170]1,2):[130]:[153]"valntry deleted"
470 n[178]n[171]1:[141]1200:[137]320
499 [143] save subroutine
500 [153]"load(NULL)atn(NULL)val":[141]1300:[139]x$[179][177]"y"[167][142]
505 [153]"load"[163]p1)"*** (NULL)atn(NULL)valwait ***
510 print"[206]ame of file":inputnf$:gosub1000
520 open2,8,2,"0:"+nf$+",s,w":print#2,n
530 fori=1ton:print#2,q$(i,1);chr$(13);q$(i,2):next
540 close2:print"[198]ile "nf$:print"saved":gosub1100:return
599 rem load subroutine
600 ifn=0thengosub690:goto650
605 print"[147][204][207][193][196]":gosub1300:ifx$<>"y"thenreturn
608 gosub690
610 print"[212]here is currently a file in memory.":print"[196]o you want to:
620 [153][163]p1)"(NULL)waiteplace file":[153][163]p1)"(NULL)waiterge files
630 gosub1010
632 ifx$="r"thengosub690:print"[210]eplace file":n=1:goto650
634 ifx$="m"thengosub690:print"[205]erge files":goto650
636 goto630
650 print"[206]ame of file":inputnf$:gosub1000:open2,8,2,"0:"+nf$+",s,r":input#2,w
660 n=n+1:input#2,q$(n,1),q$(n,2):ifst=0then660
670 close2:print"[198]ile "nf$:print"now in memory with":printn" entries
680 [153][163]p1)"(NULL)ress any keywait":[141]1010:[142]
690 [153]"load"[163]p1)"*** (NULL)(NULL)atnstr$wait ***":[142]
999 [143] miscellaneous subroutines
1000 [153]"right$nsert question file disk. (NULL)ress any keywhen ready."
1010 [161]x$:[139]x$[178]""[167]1010
1020 [142]
1100 [129]t[178]1[164]1500:[130]:[142]
1200 [129]t[178]1[164]500:[130]:[142]
1300 [153]"atnre you sure? ((NULL)/(NULL))":[137]1010